package com.core.androidlearndemo.dragger2;

import android.content.Context;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v7.app.AppCompatActivity;
import android.view.View;

import com.core.androidlearndemo.R;

import javax.inject.Inject;

public class Dragger2TestActivity extends AppCompatActivity implements ICommonView{

    @Inject
    TestPresenter presenter;

    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_dragger2test);
        DaggerCommonComponent.builder().commonModule(new CommonModule(this)).build().inject(this);

        findViewById(R.id.login_btn).setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                presenter.login(new UserBean());
            }
        });
    }

    @Override
    public Context getContext() {
        return this;
    }
}
